/* 学生考试历史页面样式 */
.exam-history {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 筛选器样式 */
.filters {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #666;
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 考试列表样式 */
.history-list {
    display: grid;
    gap: 20px;
}

.exam-item {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.exam-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.exam-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.exam-item:hover::before {
    width: 8px;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.exam-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.exam-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exam-status.completed {
    background: #d4edda;
    color: #155724;
}

.exam-status.in_progress {
    background: #fff3cd;
    color: #856404;
    animation: pulse 2s infinite;
}

.exam-status.not_started {
    background: #e2e3e5;
    color: #383d41;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* 考试信息样式 */
.exam-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.info-value.score {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
}

/* 操作按钮样式 */
.exam-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
}

.action-btn.view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.start {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.action-btn.start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.action-btn.continue {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.action-btn.continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
}

.empty-subtext {
    color: #999;
    font-size: 0.95rem;
}

/* 加载状态样式 */
.loading-state {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .exam-history {
        padding: 20px 15px;
    }

    .page-title {
        font-size: 2rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .search-box {
        min-width: auto;
    }

    .filter-options {
        justify-content: space-between;
    }

    .exam-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .exam-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .exam-actions {
        justify-content: center;
    }

    .action-btn {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .exam-item {
        padding: 20px;
    }

    .exam-title {
        font-size: 1.1rem;
    }

    .exam-status {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .action-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exam-item {
    animation: fadeInUp 0.5s ease forwards;
}

.exam-item:nth-child(1) {
    animation-delay: 0.1s;
}

.exam-item:nth-child(2) {
    animation-delay: 0.2s;
}

.exam-item:nth-child(3) {
    animation-delay: 0.3s;
}

.exam-item:nth-child(4) {
    animation-delay: 0.4s;
}

.exam-item:nth-child(5) {
    animation-delay: 0.5s;
}